<?php
	global $shop;
?>	
  	<div class="nav_bar">
  		<a href="<?php echo edp_href_link(PAGENAME_MAIN);?>">首页</a> > 
<?php
	if($shop['plat_id']<'100')
	{
?>
		<a href="<?php echo edp_href_link(PAGENAME_PLATFORM, 'platid='.$shop['plat_id']);?>"><?php echo $shop['plat_name'];?></a> > 
<?php
	}
?>		
  		<a href="<?php echo edp_href_link(PAGENAME_SHOP_INFO, 'sid='.$shop['id'])?>"><?php echo $shop['shop_name'];?></a> > 
  		商品(<?php echo $productCount;?>件)
  	</div>
        <div class="main_box">
        <!--*************左栏开始******************-->
        	<div class="left_bar">
            	<div class="left_topbg"></div>
                <div class="left_middleline">
                	<div class="goodcategory"><span>商品分类</span><label>CATEGORY</label></div>
                    <dl class="goodlist">
                    	<dt><span>所有分类</span></dt>
                    	<?php

						if($productCategory)
						{
						    foreach( $productCategory as $key=>$value ) {
					             echo '<dd><a href="'.edp_href_link(PAGENAME_PRODUCT_SUMMARY, 'sid='.$sid.'&pcid='.$value).'">'.$key.'</a></dd>';
					        }
						}
						
						?>

                    </dl>
                </div>
                <div class="left_bottombg"></div>
            </div>
        <!--*************左栏结束*************************-->
       
       	  <div class="right_bar">
            	<div class="orange_box">
                	<div class="orange_top"></div>
                    <div class="orange_middle">
                    	<div class="orange_title">
                        	<h1><?php secho( $shop['shop_name'] ); ?>-热评商品</h1>
                            <input type="button" value="添加商品" class="btn_2" onClick="location.href='<?php echo edp_href_link(PAGENAME_ADD_PRODUCT,'sid='.$sid);?>';">
                            <input type="button" value="店铺页面" class="btn_2" onClick="location.href='<?php echo edp_href_link(PAGENAME_SHOP_INFO,'sid='.$shop['id']);?>';">
                        </div>
                   
                        
							<?php
								if($hotProductResult)
								{
							?>
							     <div class="white_box">
							 <?php     		
									foreach($hotProductResult as $product)
									{
							 ?>
										<dl class="pic_list">
										<dt><div><a href="<?php echo edp_href_link(PAGENAME_PRODUCT_INFO,'pid='.$product['id']);?>"><img src="<?php echo $product['pic_path'];?>" width="150" height="150" /></a></div></dt>
										<dd><a href="<?php echo edp_href_link(PAGENAME_PRODUCT_INFO,'pid='.$product['id']);?>"><?php secho( $product['product_name'] ); ?></a></dd>
                           			  </dl>
							<?php
									}
							?>	
									</div>		
							<?php	}
							?>               
                             
                         
                   
                    </div>                 
                  <div class="orange_bottom"></div>
                </div>
            <div class="order_box" id="order_box">
            	<h1></h1>
                <h2>       
                    <form id="filterform" method="GET" action="<?php echo edp_href_link(PAGENAME_PRODUCT_SUMMARY); ?>">
           			  <input type="hidden" value="<?php echo $sid; ?>" name="sid" id="sid">
           			  <input type="hidden" value="<?php echo $pcid ?>" name="pcid" id="pcid">
           			  <input type="hidden" value="<?php echo $sortby; ?>" name="sortby" id="sortby">
                    <div class="orderlink">
                 		  
                    	<div class="orderlinktxt">
							<a name="sortanchor" id="sortanchor" href=""></a>
							按照
							<a id="sort_review_count" href="">人气</a>|
                        	<a id="sort_price"  href="">价位</a>|
                        	<a id="sort_create_time" href="">加入时间</a> 排序
                        </div>
                        <div class="orderbutton"><a id="sort_asc" href=""><img src="<?php echo IMAGE_DIR; ?>arrow4.gif" /></a></div>
                        <div class="orderbutton"><a id="sort_desc" href=""><img src="<?php echo IMAGE_DIR; ?>arrow5.gif" /></a></div>
                    
                    </div>
                    <div class="ordertitle">
                    	   <input type="text" name="<?php echo UP_SEARCH_KEY;?>" id="<?php echo UP_SEARCH_KEY;?>" value="<?php echo $keyword; ?>" class="searchvalue" />
                           <input type="submit" value="搜索商品" class="btn_1" />
                    </div>
  				 </form>
                </h2>
                <h3></h3>
            </div>
           	  <ul class="listbox">
           	  
				 <?php 
				 
				 
				 	if( isset( $productResult ) && count($productResult) > 0 ) {
						foreach( $productResult as $product ) {
				?>
						
						  <li>
		                   	  <h1><a href="<?php echo edp_href_link(PAGENAME_PRODUCT_INFO,'pid='.$product['id']);?>"><img src="<?php echo $product['pic_path'];?>" width="64" height="64" /></a></h1>
		                      <h2><div><a href="<?php echo edp_href_link(PAGENAME_PRODUCT_INFO,'pid='.$product['id']);?>"><?php echo( $product['product_name'] ); ?></a></div>
		                      <span>分类：<a href="<?php echo edp_href_link(PAGENAME_PRODUCT_SUMMARY,'sid='.$sid.'&pcid='.$product['cate_id']);?>"><?php echo $productcategoryDAO->GetProductCategoryName($product['cate_id']);?></a></span> </h2>
		                      <h3><span><?php echo $product['price'];?></span> 元</h3><h4><?php echo $product['review_count'];?>封点评</h4>
		                  </li>
				<?php
						}
						
						echo $pageObj->getBar();
					}
					else{
						echo "<li><center>没有找到相关产品</center><br />
						<center><a href=\"".edp_href_link(PAGENAME_AUTO_ADD_PRODUCT,'sid='.$shop['id'])."\">试试手气，从淘宝自动添加商品&gt;&gt;</a></center>
						</li>";
					}
				?>	
			</ul>
			</div>
